#include "endlevel.h"

EndLevel::EndLevel(int health, int score)
{
    level_alive = true;
    restart_level = false;

    scrollY =400;
    swordY=0;

    textL = new MyText(40);
    textS = new MyText(25);

    title_image.load("grafx/titlescreen/endbackground.png");
    sword.load("grafx/titlescreen/sword.png");
    grass.load("grafx/titlescreen/grass.png");

    //music->create_audio_thread( "sounds/titlescreen/endgame.ogg", "LF" );

    level_alive = true;
}

void EndLevel::draw()
{
    if(scrollY > -3800)
        scrollY-=1;
    else
        level_alive = false;

    title_image.draw(0,0);

    scroll();
    sword.draw(0, swordY);
    grass.draw(0, 405);

}

void EndLevel::scroll()
{

    textL->draw("Game Concept",300,0+scrollY, 255,0,0);
    names(0+scrollY);

    textL->draw("Graphics Design",300,400+scrollY, 255,0,0);
    names(400+scrollY);

    textL->draw("Audio Engineering",300,800+scrollY, 255,0,0);
    names(800+scrollY);

    textL->draw("Programming",300,1200+scrollY, 255,0,0);
    names(1200+scrollY);

    textL->draw("Music Arrangement",300,1600+scrollY, 255,0,0);
    names(1600+scrollY);

    textL->draw("Production Advisors",300,2000+scrollY, 255,0,0);
    names(2000+scrollY);

    textL->draw("Scenario Writers",300,2400+scrollY, 255,0,0);
    names(2400+scrollY);

    textL->draw("Producers",300,2800+scrollY, 255,0,0);
    names(2800+scrollY);

    textL->draw("The End??",300,3400+scrollY, 255,0,0);



}

void EndLevel::names(int startY)
{

    textS->draw("Blaise Millegan",350,startY+60);
    textS->draw("Oliver Bochsler",350,startY+90);
    textS->draw("Jason Stafford",350,startY+120);

}

void EndLevel::moveup()
{

}

void EndLevel::movedown()
{

}

EndLevel::~EndLevel()
{
    cout << "bye end level\n";
}


